﻿<UserControl x:Class="PersonalClient.Controls.AutoCompletionTextBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:self="clr-namespace:PersonalClient.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="54" d:DesignWidth="298" Loaded="UserControl_Loaded">
    <UserControl.Resources>

    </UserControl.Resources>
    <!--<UserControl.Triggers>
        <EventTrigger RoutedEvent="{x:Static Member=self:AutoCompletionTextBox.ResultArrive}">
            <EventTrigger.Actions>
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation To="1" Duration="0:0:1" 
                                     Storyboard.TargetName="lstResult" Storyboard.TargetProperty="Opacity"></DoubleAnimation>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger.Actions>
        </EventTrigger>
    </UserControl.Triggers>-->
    <Grid>
        <TextBox Name="txtSearch" TextChanged="TextBox_TextChanged" KeyDown="txtSearch_KeyDown_1"></TextBox>
        <Popup IsOpen="False"
                Name="pp" 
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=txtSearch}"
               >
            <ListBox Name="lstResult" SelectionChanged="lstResult_SelectionChanged">
            </ListBox>
        </Popup>
    </Grid>
</UserControl>
